package com.aierjun.lgmusic.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.Nullable;

import com.aierjun.lgmusic.R;
import com.sam.ui.base.activity.BaseActivity;

/**
 * Created by Administrator on 2016/10/10.
 */
public class InfoActivity extends BaseActivity {
    private Handler handler;

    @Override
    protected void onCreate(@Nullable Intent intent) {
        setContentView(R.layout.welcome);
    }

    @Override
    protected void findView() {
        handler=new Handler(){
            @Override
            public void handleMessage(Message msg) {
                if (msg.what==1){
                    startActivity(new Intent(InfoActivity.this,LoginActivity.class));
                }
            }
        };
    }

    @Override
    protected void initView() {
        new ThreadMain().start();
    }
    class ThreadMain extends Thread{
        @Override
        public void run() {
            super.run();
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            handler.obtainMessage(1,"ok").sendToTarget();
        }
    }
}
